<template>
  <div class="searchContent">
    <div class="BusinessSearchExport">
      <a-input
        placeholder="请输入项目名称"
        v-model="searchParams.name"
        allowClear
      />
      <a-input
        placeholder="请输入发起单位"
        v-model="searchParams.subject"
        allowClear
        class="marginL10"
      />
      <a-button
        @click="clear"
        class="marginL10 width74"
      >重置</a-button>
      <a-button
        class="marginL14 width74"
        @click="search"
        type="primary"
      >查询</a-button>
    </div>
    <div class="excleExport">
      <export-button />
    </div>
  </div>

</template>

<script>
import ExportButton from '@/components/buttonAboutExcel/ButtonAboutExcel';
export default {
  name: 'BusinessSearchExport',
  components: {
    ExportButton
  },
  data () {
    return {
      valueP: [],
      searchParams: {
        name: '',
        subject: ''
      }
    }
  },
  methods: {
    search () {
      this.$emit('search', this.searchParams)
    },
    clear () {
      this.searchParams = {
        name: '',
        subject: ''
      }
      this.valueP = []
      this.$emit('search', this.searchParams)
    }
  }
}
</script>

<style lang="less" scoped>
.searchContent {
  display: flex;
  justify-content: space-between;
  padding-right: 9px;
  .excleExport {
    .ant-btn {
      height: 34px;
      width: 74px;
      padding: 0;
      font-size: 14px;
      border-radius: 3px;
    }
  }
}
.BusinessSearchExport {
  display: flex;
  margin-bottom: 8px;
  .ant-input-affix-wrapper {
    padding-left: 4px;
  }
  .marginR14 {
    margin-right: 14px;
  }
  .marginL10 {
    margin-left: 10px;
  }
  .marginL14 {
    margin-left: 14px;
  }
  .width74 {
    width: 74px;
  }
  .ant-btn {
    height: 34px;
  }
}
</style>
